/* 
 *  Incub - incubate your baby robot
 *  Copyright (C) 2008 Stanislaw Szymczyk
 *  e-mail: sszymczy@gmail.com   www: http://cogville.cog-lab.com
 *
 *  This file is part of Incub.
 *
 *  Incub is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  Incub is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Incub.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
 
#include "Motor.h"

using std::string;
using std::numeric_limits;

Motor::Motor() {
	loStop = -numeric_limits<double>::infinity();
	hiStop = numeric_limits<double>::infinity();
	bounciness = 0;
}

void Motor::setAxis(string axis) {
	sscanf(axis.c_str(), "%lf %lf %lf", &this->axis.x, &this->axis.y, &this->axis.z);	
}

Vector3D& Motor::getAxis() {
	return axis;
}

void Motor::setLoStop(string loStop) {
	this->loStop = atof(loStop.c_str());
}

float Motor::getLoStop() {
	return loStop;
}

void Motor::setHiStop(string hiStop) {
	this->hiStop = atof(hiStop.c_str());
}

float Motor::getHiStop() {
	return hiStop;
}

void Motor::setAngle(float angle) {
	this->angle = angle;
}

float Motor::getAngle() {
	return angle;
}

void Motor::setBounciness(string bounciness) {
	this->bounciness = atof(bounciness.c_str());
}

float Motor::getBounciness() {
	return bounciness;
}
